-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add field for span http request body to IntakeV2 #366
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall LGTM, just a minor comment.
additional question: isn't this changing the spec, should it be submitted to the apm repository ?
@kruskall Yeah I thought too that this would be good enough, but when testing this change with apm-server it simply didn't work:
That was my blocker and I had no idea on where/ how to find out why. Did you try it with apm-server? |
@JonasKunz can you share the payload you are sending to the intake v2 api ? |
here is the branch where I attempted to locally test with apm-server: This is the altered span test data where I added a body: |
Hey @JonasKunz 👋 It seems to be working fine for me.
payload.json:
|
@kruskall thanks for testing! I guess then something was wrong with my test setup. |
Part of elastic/apm-agent-java#3788.
The idea of this PR was to add a new field to Intake V2 to allow storing of HTTP client request bodies (therefore on spans instead of transactions) into the existing
http.request.body.original
elasticsearch field.I initially though this would be trivial, because
http.request.body.original
is already populated from transactions. Because in modelpb theHTTP
data structure is shared for spans and transactions, I expected that no additional changes (e.g. in apm-package) are necessary.However, this doesn't seem to work: Even though the tests show that
modelpb Http.Request.Body
is correctly populated from IntakeV2 spans,http.request.body.original
is not populated for spans in elasticsearch.Some hints where to look would be great, I already extended the tests showing that the body is correctly populated for modeljson.
I tried also adding a request body to the transaction system tests in APM-server: This causes the system tests to still pass, even though they should fail because the body is not part of the approved documents. So somehow something weird is going on here or I'm totally missing something